import unittest


class Demo1TestCase(unittest.TestCase):

    def test01(self):
        print('test01')

    def test02(self):
        print('test02')


class Demo2TestCase(unittest.TestCase):

    def testa(self):
        print('test0a')

    def testb(self):
        print('testb')

if __name__ == '__main__':
    # unittest.main()
    #创建一个测试套件
    suite =unittest.TestSuite()
    tests=[
        Demo1TestCase('test02'),
        Demo2TestCase('testb')
    ]
    suite.addTests(tests)
    #创建一个执行器
    runer=unittest.TextTestRunner(verbosity=2)
    runer.run(suite)

